<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" href="css/common.css" type="text/css" />
<link href="css/adminstyle.css" rel="stylesheet" type="text/css">
<title>管理区域</title>

</head>

<body>

<div id="man_zone">

<input name="" type="button" class="PublicBot" value="返回" onclick="window.history.go(-1);" />

 <form  method="post" action="<? if  (empty($id)){ echo  'adminGroup_subAdd.html'; }else{ echo  'adminGroup_subUpdate.html'; }  ?>" ><input name="id" type="hidden" value="<?=$id?>">



  <table width="98%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">

    <tr bgcolor="#FFFFFF">

      <td width="11%"  class="left_title_2adminssd">组名</td>

      <td width="21%"><input name="name" type="text"  value="<?=getStr($extract_vars,'name')?>"></td>

      <td width="11%"  class="left_title_2adminssd">代号</td>

      <td width="21%">
      <?if(!empty($id)){?>
      <?=getStr($extract_vars,'code')?>
      <?}else{?>
      <input name="code" type="text"  value="<?=getStr($extract_vars,'code')?>"></td>
	  <?}?>
      <td width="12%"  class="left_title_2adminssd">是否是管理员</td>

      <td width="26%"><input type="checkbox" name="admin"  value="<?=ADMIN?>"  id="checkbox" <? if (getStr($extract_vars,'admin')==ADMIN){echo 'checked="checked"'; } ?> /></td>

      </tr>

       <tr bgcolor="#FFFFFF">

          <td class="left_title_2adminssd">权限</td>

          <td colspan="5">

                <table border="0" cellpadding="0" cellspacing="0">

        <?

        function  classInfo ($data,$leve=0,$tmp="",$permissions_functoin)

		{

			if (!empty($data))

			{

				if ($leve>0)

				{

					$tmp="|--".$tmp;

				}

				$leve++;

				

				foreach ($data as $v)

				{

					?>

    <tr bgcolor="#FFFFFF">

          <td align="center"><input type="checkbox" name="permissions_functoin[]" <? if (is_array($permissions_functoin)){  if(in_array($v['id'],$permissions_functoin)){echo 'checked="checked"'; }} ?>  value="<?=$v['id']?>"></td>

      <td ><? echo  $tmp. Common::_t($v['mark']); ?></td>   

    </tr> 

			<?

                    classInfo($v['next'],$leve,$tmp,$permissions_functoin);

				}

			}

		}

		classInfo($function,0,'',getStr($extract_vars,'permissions_functoin'));

		?>

          </table>

          </td>

      </tr>



    <tr bgcolor="#FFFFFF">

      <td colspan="4" align="center" >

        <input name="" type="submit" value="提交" />      </td>

    </tr>

  </table>

  </form>

</div>

</body>

</html>

